import React from 'react'
import Login from './pages/login'
import Admin from './pages/admin'
import { Switch, Route, Redirect } from 'react-router-dom'
import { store } from './stores'
import { Provider } from 'react-redux'

export default function App() {
  return (<Provider store={store}>
    <div>
      <Switch>
        <Route path='/login' component={Login}></Route>
        <Route path='/admin' component={Admin}></Route>
        <Redirect from='/' to='/admin'></Redirect>
      </Switch>
    </div>
  </Provider>

  )
}
